import server from "@/utils/request";
// 用户活跃排行
export function index_activeUserRanking(playold = {}) {
    return server.get("/school/index/activeUserRanking", { params: playold })
}
// 发布消息统计
export function index_releaseMessageNum(playold = {}) {
    return server.get("/school/index/releaseMessageNum", { params: playold })
}
//获取教师
export function teacher_getTeacherByPage(playold = {}) {
    return server.get("/school/teacher/getTeacherByPage", { params: playold })
}
//学生、家长列表
export function student_getStudentByPage(playold: any = {}) {
    return server.get("/school/student/getStudentByPage", { params: playold })
}

//相册列表
export function photos_getPhotosByPage(playold: any = {}) {
    return server.get("/school/photos/getPhotosByPage", { params: playold })
}
//发布相册
export function savePhotos(playold: any = {}) {
    return server.post(`/school/photos/savePhotos?name=${playold.name}&detail=${playold.detail}&img=${playold.img}`, playold)
}
//根据姓名获取相册
export function photos_getPhotosByTeacherName(name: any = {}) {
    return server.get(`/school/photos/getPhotosByTeacherName/` + name)
}
//新增老师
export function saveTeacher(playold: any = {}) {
    return server.post(`/school/teacher/saveTeacher?id=${playold.id}&name=${playold.name}&sex=${playold.sex}&sId=${playold.sId}&deptId=${playold.deptId}&roleId=${playold.roleId}&phone=${playold.phone}&username=${playold.username}&password=${playold.password}`, playold)
}
//新增家长（学生）
export function saveStudent(playold: any = {}) {
    return server.post(`/school/student/saveStudent?name=${playold.name}&classId=${playold.classId}&sex=${playold.sex}&documentNum=${playold.documentNum}&phone=${playold.phone}&password=${playold.password}`, playold)
}
//删除驳回图片
export function deletePhotos(id: any) {
    return server.delete(`/school/photos/deletePhotos/` + id)
}
//同意图片
export function agree(id: any = {}) {
    return server.get(`/school/photos/agree/` + id)
}
//点名
export function getAttendanceByClassesTimeByPage(playold: any = {}) {
    return server.get(`/school/attendance/getAttendanceByClassesTimeByPage`, { params: playold })
}

//缺勤
export function markedAbsent(id: any = {}) {
    return server.get(`/school/attendance/markedAbsent/` + id)
}

//迟到
export function markLate(id: any = {}) {
    return server.get(`/school/attendance/markLate/` + id)
}

